package com.hawk.eye.common.client;

import com.hawk.eye.common.utils.http.OkHttpUtil;
import okhttp3.ConnectionPool;

import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * @className: OkHttpClient
 * @description:
 * @author: salad
 * @date: 2023/10/15
 **/
public class OkHttpClient implements IClient {

    @Override
    public String pushLogMessage(String url, Map<String, String> header, String json) {
        try {
            return OkHttpUtil.postJson(url, header, json);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public String pushMetadata(String url, String json)  {
        try {
            return OkHttpUtil.postJson(url, json);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

}
